/*
 * Copyright 2010 bedatadriven
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

/**
 * JacobGen generated file --- do not edit
 *
 * (http://www.bigatti.it/projects/jacobgen)
 */
package com.bedatadriven.mso.powerpoint;

import com.bedatadriven.mso.core.MsoDiagramNodeType;
import com.bedatadriven.mso.core.MsoOrgChartLayoutType;
import com.bedatadriven.mso.core.MsoRelativeNodePosition;
import com.bedatadriven.mso.core.Shape;
import com.google.gwt.core.client.JavaScriptObject;

/** Wrapper for PowerPoint.DiagramNode*/
public class DiagramNode extends JavaScriptObject {

	protected DiagramNode() { }
	public native final Object getApplication()/*-{
		return this.Application;
	}-*/;

	public native final int getCreator()/*-{
		return this.Creator;
	}-*/;

	protected native final DiagramNode _addNode( int pos,  int nodeType)/*-{
		return this.AddNode( pos, nodeType);
	}-*/;

	public final DiagramNode addNode(MsoRelativeNodePosition pos, MsoDiagramNodeType nodeType){
		return _addNode(pos.getValue(), nodeType.getValue());
	}
	public native final void delete()/*-{
		this.Delete( );
	}-*/;

	protected native final void _moveNode(DiagramNode targetNode,  int pos)/*-{
		this.MoveNode( targetNode, pos);
	}-*/;

	public final void moveNode(DiagramNode targetNode, MsoRelativeNodePosition pos){
		_moveNode(targetNode, pos.getValue());
	}
	public native final void replaceNode(DiagramNode targetNode)/*-{
		this.ReplaceNode( targetNode);
	}-*/;

	public native final void swapNode(DiagramNode targetNode, boolean swapChildren)/*-{
		this.SwapNode( targetNode, swapChildren);
	}-*/;

	protected native final DiagramNode _cloneNode(boolean copyChildren, DiagramNode targetNode,  int pos)/*-{
		return this.CloneNode( copyChildren, targetNode, pos);
	}-*/;

	public final DiagramNode cloneNode(boolean copyChildren, DiagramNode targetNode, MsoRelativeNodePosition pos){
		return _cloneNode(copyChildren, targetNode, pos.getValue());
	}
	public native final void transferChildren(DiagramNode receivingNode)/*-{
		this.TransferChildren( receivingNode);
	}-*/;

	public native final DiagramNode nextNode()/*-{
		return this.NextNode( );
	}-*/;

	public native final DiagramNode prevNode()/*-{
		return this.PrevNode( );
	}-*/;

	public native final Object getParent()/*-{
		return this.Parent;
	}-*/;

	public native final DiagramNodeChildren getChildren()/*-{
		return this.Children;
	}-*/;

	public native final Shape getShape()/*-{
		return this.Shape;
	}-*/;

	public native final DiagramNode getRoot()/*-{
		return this.Root;
	}-*/;

	public native final Diagram getDiagram()/*-{
		return this.Diagram;
	}-*/;

	protected native final int _getLayout()/*-{
		return this.Layout;
	}-*/;

	public final MsoOrgChartLayoutType getLayout(){
		return MsoOrgChartLayoutType.valueOf(_getLayout());
	}
	protected native final void _setLayout( int value)/*-{
		this.Layout = value;
	}-*/;

	public final void setLayout(MsoOrgChartLayoutType value){
		_setLayout(value.getValue());
	}
	public native final Shape getTextShape()/*-{
		return this.TextShape;
	}-*/;

}
